package com.intelligent.system.auth.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Set;

@Data
@ApiModel(description = "角色信息")
public class RoleDTO {
    @ApiModelProperty(value = "角色ID", example = "1")
    private Long roleId;

    @NotBlank(message = "角色名称不能为空")
    @Size(max = 30, message = "角色名称长度不能超过30个字符")
    @ApiModelProperty(value = "角色名称", required = true)
    private String roleName;

    @NotBlank(message = "角色编码不能为空")
    @Size(max = 100, message = "角色编码长度不能超过100个字符")
    @ApiModelProperty(value = "角色编码", required = true)
    private String roleCode;

    @NotNull(message = "显示顺序不能为空")
    @ApiModelProperty(value = "显示顺序", required = true)
    private Integer roleSort;

    @ApiModelProperty("数据范围（1：全部数据权限 2：自定数据权限 3：本部门数据权限 4：本部门及以下数据权限）")
    private Byte dataScope;

    @ApiModelProperty("角色状态（0正常 1停用）")
    private Byte status;

    @Size(max = 500, message = "备注长度不能超过500个字符")
    @ApiModelProperty("备注")
    private String remark;

    @ApiModelProperty("菜单ID列表")
    private List<Long> menuIds;

    @ApiModelProperty("菜单列表（包含选中状态）")
    private List<MenuWithRoleDTO> menus;

    @ApiModelProperty("创建者")
    private String createBy;

    @ApiModelProperty("创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty("更新者")
    private String updateBy;

    @ApiModelProperty("更新时间")
    private LocalDateTime updateTime;
} 